package action;

import java.util.ArrayList;

import manager.ComManager;
import manager.LoadVariousList;
import manager.ObjectFactory;
import bean.CombinaisonBean;
import bean.LoadCombinaisonListMessage;

public class ActionGetListCombinaisons {
	
	/*
	 * Filter define the filter applied to the list
	 * can take all, notFind, owned or won 
	 *
	 */
	public ArrayList<CombinaisonBean> doGetListCombinaisons(String filter){
		ObjectFactory of = new ObjectFactory();
		ComManager com = of.createComManager();
		LoadCombinaisonListMessage mOut = of.createLoadCombinaisonListMessage();
		mOut.setFilter(filter);
		mOut.setIdUser(LoadVariousList.getIdUser());
		LoadCombinaisonListMessage mIn ;
		
		mIn = (LoadCombinaisonListMessage)com.sendMessage(mOut);
		ArrayList<CombinaisonBean> listCombinations = mIn.getListCombi();
		return listCombinations;
	}
}
